package ExceptionDemo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2025-03-13
 * Time: 21:37
 */
public class Test2 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4};

        try {
            System.out.println(arr[10]);
            System.out.println("try之后的语句");
        }catch (ArrayIndexOutOfBoundsException e){
            System.out.println("指针越界异常");
        }
        System.out.println("异常之后的语句");
    }
}
